<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib  prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@	taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    <title>记录</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link href="http://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
    <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
    <script src="http://libs.baidu.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
    <link rel="stylesheet" href="css/pagination.css" type="text/css"></link>
     <link rel="stylesheet" href="css/01.css" type="text/css"></link>
    <script type="text/javascript" src="js/jquery.pagination.js"></script>
    <script type="text/javascript" src="js/index.js"></script>
	<!--common-->
    <script type="text/javascript">
	function handlePaginationClick(new_page_index,pagination_container) {
	    $("#supplierForm").attr("action","test/getTestInfolist?pageIndex="+(new_page_index+1));
	    $("#supplierForm").submit();
	    return false;
	}
  	$(function(){
			$("#News-Pagination").pagination(${pager.totalRecords},{
		        items_per_page:${pager.pageSize},
		        current_page:${pager.pageIndex}- 1,
		        num_display_entries:2,
		        next_text:"下一页",
		        prev_text:"上一页",
		        maxentries:${pager.totalRecords},
		        num_edge_entries:3,
		        callback:handlePaginationClick
			});
		});
  	</script>
  </head>
<body>
<div align="right">
    <table class="table table-striped">
    	<thead>
		      <tr style="background-color:#FF6EB4;">
		         <th>用户订单</th>
		         <th>用户姓名</th>
		         <th>用户年龄</th>
		         <th>用户密码</th>
		         <th>用户性别</th>
		         <th>注册时间</th>
		         <th>用户备注</th>
		      </tr>
		   </thead> 
		   <tbody>
		    	<c:forEach items="${pager.list}" var="p">
		    		  <tr>
				         <td>${p.testid}</td>
				         <td>${p.testName}</td>
				         <td>${p.testAge}</td>
				         <td>${p.testPwd}</td>
				         <td>
				         <c:choose>
				        		<c:when test="${p.testSex == 0}">
									男
								</c:when>
								<c:when test="${p.testSex == 1}">
									女
								</c:when>
								<c:when test="${p.testSex == 2}">
									未填写
								</c:when>
							</c:choose>
				         </td>
				         <td>${fn:substring(p.createtime,0,19)}</td>
				         <td>${p.reMark}</td>
				      </tr>
		    	 </c:forEach>
	   	   </tbody>
	</table>
	<form id="supplierForm"  method="post" action="">
		<div style="height:20px;" id="News-Pagination"  align="center"></div>
	</form>
</body>
</html>